package com.sinven.mapper;

import com.sinven.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    /**
     * 根据用户编码查询用户信息
     * @param userCode 用户编码
     * @return User信息
     */
    User queryByUserCode(String userCode);

    void updateUserPwd(@Param("userId") int userId,
                       @Param("userPwd") String newPwd) throws Exception;

    void updateLastLoginTime(int userId) throws Exception;

    void addUser(User user) throws Exception;

    List<User> queryAll();

    void deleteUserById(int userId) throws Exception;
}
